package com.usian.wemedia.controller.v1;

import com.usian.common.dtos.ResponseResult;
import com.usian.model.admin.dtos.AdUserLoginDto;
import com.usian.model.media.dtos.WmUserLoginDto;
import com.usian.wemedia.service.IWmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class WmLoginController {

    @Autowired
    private IWmUserService wmUserService;

    /**
     * 用户登录功能
     */
    @PostMapping("/login/in")
    public ResponseResult<Map<String,Object>> login(@RequestBody WmUserLoginDto dto){
        Map<String,Object> map = wmUserService.login(dto);
        return ResponseResult.ok(map);
    }
}
